<?php //debug($user)?>
<?php echo $this->Form->create('Moderator',array('enctype' => 'multipart/form-data'));
            echo $this->Form->input('UserProfile.id',array('type'=>'hidden','value'=>$this->data['UserProfile']['id']));
            echo $this->Form->input('User.id',array('type'=>'hidden','value'=>$this->data['User']['id']))
 ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
          <tr valign="top">
            <td width="26%" ><?php if (!empty($this->data['UserProfile']['image'])) { ?>
                    <?php echo $this->Form->input('UserProfile.img', array('type' => 'hidden', 'value' => $this->data['UserProfile']['image'])); ?>
                    <?php 
                          $thumbnail = $this->PhpThumb->generate(
                                array(
                                    'save_path' => WWW_ROOT . 'img/uploads/Moderators/thumbs',
                                    'display_path' => 'uploads/Moderators/thumbs',
                                    'error_image_path' => 'img/error.jpg',
                                    'src' => WWW_ROOT . "img/uploads/Moderators/".$this->data['UserProfile']['image'],
                                    'w' => 250,
                                    'h' => 250,
                                    'q' => 100,
                                    'zc' => 1
                                    )
                                );

                          echo $this->Html->image($thumbnail['src'], array('width' => $thumbnail['w'], 'height' => $thumbnail['h']));                          
                         ?>
                        <div style="color:#c73e14;"><?php echo $this->Html->link("Change image?", array('controller' => 'Moderators', 'action' => 'delete_image', $this->data['UserProfile']['id']), array('style' => 'color:#c73e14;')); ?></div>
                <?php } else {
                                echo $this->Form->input('UserProfile.image', array('label' => '', 'type' => 'file')); 
                             } ?>
                </td>
            <td width="74%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><div class="content-arae">
                          <h1><?php echo $this->Form->input('UserProfile.screenname',array('label'=>'')); ?></h1>
                      
                      
                </td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="side-table">
                      <tr>
                        <td><strong>First Name:</strong></td>
                        <td><?php echo $this->Form->input('UserProfile.first_name',array('label'=>'')); ?></td>
                      </tr>
                          <tr  class="bgcolor">
                        <td width="36%"><strong>Last Name:</strong></td>
                        <td><?php echo $this->Form->input('UserProfile.last_name',array('label'=>'')); ?></td>
                      </tr>
                      <tr class="bgcolor">
                        <td><strong>Screen Name:</strong></td>
                        <td><?php echo $this->Form->input('UserProfile.screenname',array('label'=>'')); ?></td>
                      </tr>
                      <tr>
                        <td><strong>Email:</strong></td>
                        <td><?php echo $this->Form->input('User.email',array('label'=>'')); ?></td>
                      </tr>
                      <tr class="bgcolor">
                        <td><strong>Alternative Email:</strong></td>
                        <td><?php echo $this->Form->input('UserProfile.alt_email',array('label'=>'')); ?> </td>
                      </tr>
                      <tr>
                        <td><strong>DOB:</strong></td>
                        <td><?php echo $this->Form->input('UserProfile.dob',array('label'=>'','minYear'=>(date('Y')-100),'maxYear'=>date('Y'))); ?></td>
                      </tr>
                      <tr  class="bgcolor">
                        <td><strong>Gender:</strong></td>
                        <td> <?php echo $this->Form->input('UserProfile.sex',array('label'=>'')); ?></td>
                      </tr>
                      <tr>
                        <td><strong>Religion:</strong></td>
                        <td><?php echo $this->Form->input('UserProfile.religion',array('label'=>'')); ?></td>
                      </tr>
                               </table></td>
                </tr>
              </table></td>
          </tr>
        </table>
<?php echo $this->Form->end(array('label'=>'Save','class'=>'mybutton')) ?>
